package qq2564874169.tuaotuao.fx.utils;

import java.util.Map;

public class MapUtil {
    public static boolean isEq(Map left, Map right) {
        if (left == null && right == null) {
            return true;
        }
        if (left == null || right == null) {
            return false;
        }
        if (left.size() != right.size()) {
            return false;
        }
        for (Object k : left.keySet()) {
            if (right.containsKey(k) == false) {
                return false;
            }
            Object lv = left.get(k);
            Object rv = right.get(k);
            if (lv == null && rv == null) {
                continue;
            }
            if (lv == null || rv == null) {
                return false;
            }
            if (lv.equals(rv) == false) {
                return false;
            }
        }
        return true;
    }
}
